let t = require;
let e = module;
let o = e.exports;
o.default = e.exports;

('use strict');
console.log('start');
var _n114,
  i =
    (this && this.__extends) ||
    ((_n114 = function n(t, e) {
      return (_n114 =
        Object.setPrototypeOf ||
        ({
          __proto__: []
        } instanceof Array &&
          function (t, e) {
            t.__proto__ = e;
          }) ||
        function (t, e) {
          for (var o in e) {
            Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
          }
        })(t, e);
    }),
    function (t, e) {
      function o() {
        this.constructor = t;
      }
      _n114(t, e),
        (t.prototype =
          null === e
            ? Object.create(e)
            : ((o.prototype = e.prototype), new o()));
    });
Object.defineProperty(o, '__esModule', {
  value: !0
}),
  (o.ItemContainer = void 0);
var r = t('UIComponent'),
  a = t('ArrayUtils'),
  s = t('TimeMrg'),
  c = (function (t) {
    function e(e, o) {
      var n = t.call(this, e) || this;
      return (n.ItemClazz = o), n;
    }
    return (
      i(e, t),
      (e.prototype.onInit = function () {
        t.prototype.onInit.call(this),
          (this.ItemNode = this.view.getChildByName('Item')),
          (this.ItemNode.active = !1);
      }),
      (e.prototype.onShow = function () {
        t.prototype.onShow.call(this);
      }),
      (e.prototype.setData = function (t) {
        (this._data = t), this.removeComs(), this.delayCall(0.2, this.refresh);
      }),
      Object.defineProperty(e.prototype, 'data', {
        get: function get() {
          return this._data;
        },
        enumerable: !1,
        configurable: !0
      }),
      Object.defineProperty(e.prototype, 'count', {
        get: function get() {
          return this._data ? this._data.length : 0;
        },
        enumerable: !1,
        configurable: !0
      }),
      (e.prototype.refresh = function () {
        var t = a.ArrayUtils.convert2Array(this._data, 7),
          e =
            0.5 * t.length * this.ItemNode.height - 0.5 * this.ItemNode.height;
        this.index = 0;
        for (var o = 0; o < t.length; o++) {
          for (
            var n = t[o],
              i =
                0.5 * n.length * -this.ItemNode.width +
                0.5 * this.ItemNode.width,
              r = 0;
            r < n.length;
            r++
          ) {
            var s = new this.ItemClazz(cc.instantiate(this.ItemNode), n[r]);
            (s.view.active = !1),
              (s.view.x = i + r * this.ItemNode.width),
              (s.view.y = e - o * this.ItemNode.height),
              this.addCom(s);
          }
        }
        this.doEffect();
      }),
      (e.prototype.doEffect = function () {
        if (this.index < this.coms.length) {
          var t = this.coms[this.index++];
          (t.view.scale = 0),
            (t.view.active = !0),
            cc
              .tween(t.view)
              .to(
                0.3,
                {
                  scale: 1
                },
                {
                  easing: 'elasticOut'
                }
              )
              .start(),
            s.TimeMrg.timer.delayCall(this.doEffect, this, 0.1);
        }
      }),
      e
    );
  })(r.UIComponent);
(o.ItemContainer = c), console.log('end');
module.exports = e.exports;
